package com.ypj.indusynergyems.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ypj.indusynergyems.dao.entity.ShopEntity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Service;

@Mapper
public interface ShopMapper extends BaseMapper<ShopEntity> {

    @Select("select shop_name from shop where shop_id = #{shopId}")
    String findShopName(int shopId);


    @Select("select * from shop where shop_id = #{shopId}")
    ShopEntity findShopDetail(int shopId);
    @Update("update shop set shop_num=#{shop_num},company_num=#{company_num},user_id=#{user_id},shop_name=#{shop_name},shop_type=#{shop_type},shop_apply=#{shop_apply},shop_phone=#{shop_phone},shop_address=#{shop_address},shop_img=#{shop_img},shop_platform-apply=#{shop_platform-apply}")
    int editShop(ShopEntity shop);
    @Delete("delete from shop where shop_id = #{shopId}")
    int deleteShop(int shopId);
}
